package cn.qicaiwang.open.websocket.mapper;


import cn.qicaiwang.open.common.entity.CrmTask;
import cn.qicaiwang.open.common.req.CrmTaskREQ;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * CrmTaskMapper继承基类
 */
public interface CrmTaskMapper extends BaseMapper<CrmTask> {
    Page<CrmTask> page(Page page, @Param("params") CrmTaskREQ params);

    @Select("select  * from crm_task where del_flag = 1")
    List<CrmTask> rubbish(Page page);
    @Update("update crm_task set del_flag = 0 where  id=#{id}")
    boolean restore(String id);

    @Delete("delete from crm_task where del_flag = 1")
    boolean clear();
}